﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GFC
{
    public class CustomFieldType : FieldType
    {
        private List<FieldType> m_SubFieldTypes;

        public List<FieldType> SubFieldTypes
        {
            get { return m_SubFieldTypes; }
            private set { m_SubFieldTypes = value; }
        }

        public CustomFieldType(IEnumerable<FieldType> subFieldTypes)
        {
            this.SubFieldTypes = subFieldTypes.ToList();
            this.Size = this.SubFieldTypes.Sum(fieldType => fieldType.Size);
        }
    }
}
